<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        var tmp1 = prompt("请输入要购买的电器")
        switch (tmp1) {
                case '冰箱':
                    console.log("冰箱是2500元");
                    break;
                case '洗衣机':
                    console.log("洗衣机1500元");
                    break;
                case '电视机':
                    console.log("电视机3000元");
                    break;
                default:
                console.log("没有找到该商品");
    }
    </script>
</head>
<body>
    
</body>
</html>